package org.aceor.funny.common.http.retrofit.serializer;

import com.alibaba.fastjson.JSON;

import java.lang.reflect.Type;

/**
 * Created by lxue on 15/11/20.
 */

public class DefaultSerializer implements Serializer {

    @Override

    public <T> String serialize(T t) {
        return JSON.toJSONString(t);
    }

    @Override
    public <T> T deserialize(String json, Type type) {
        return JSON.parseObject(json, type);
    }
}
